package com.Entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Media entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "media", catalog = "monitor")
public class Media implements java.io.Serializable {

	// Fields

	private Integer id;
	private String title;
	private String src;
	private String picture;
	private String descript;
	private Date uptime;
	private String type;
	private Integer userId;
	private short userType;
	private String speaker;

	// Constructors

	/** default constructor */
	public Media() {
	}

	/** minimal constructor */
	public Media(String title, String src, String picture, Integer userId,
			short userType) {
		this.title = title;
		this.src = src;
		this.picture = picture;
		this.userId = userId;
		this.userType = userType;
	}

	/** full constructor */
	public Media(String title, String src, String picture, String descript,
			Date uptime, String type, Integer userId, short userType,String speaker) {
		this.title = title;
		this.src = src;
		this.picture = picture;
		this.descript = descript;
		this.uptime = uptime;
		this.type = type;
		this.userId = userId;
		this.userType = userType;
		this.speaker = speaker;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "title", length = 50)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "src", length = 200)
	public String getSrc() {
		return this.src;
	}

	public void setSrc(String src) {
		this.src = src;
	}

	@Column(name = "picture", length = 200)
	public String getPicture() {
		return this.picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	@Column(name = "descript", length = 400)
	public String getDescript() {
		return this.descript;
	}

	public void setDescript(String descript) {
		this.descript = descript;
	}

	@Column(name = "uptime")
	public Date getUptime() {
		return this.uptime;
	}

	public void setUptime(Date uptime) {
		this.uptime = uptime;
	}

	@Column(name = "type", length = 400)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "userId")
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "userType")
	public short getUserType() {
		return this.userType;
	}

	public void setUserType(short userType) {
		this.userType = userType;
	}
	
	@Column(name = "speaker", length = 20)
	public String getSpeaker() {
		return this.speaker;
	}

	public void setSpeaker(String speaker) {
		this.speaker = speaker;
	}

}